//
//  LCRequestManager.h
//  paas
//
//  Created by Zhu Zeng on 9/10/13.
//  Copyright (c) 2013 LeanCloud. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface LCRequestManager : NSObject

@property (nonatomic, readwrite, strong) NSMutableArray * dictArray;

- (void)synchronize:(void(^)(void))action;

- (void)setRequestForKey:(NSString *)key
                  object:(id)object;

- (void)unsetRequestForKey:(NSString *)key;

- (void)addObjectRequestForKey:(NSString *)key
                        object:(id)object;

- (void)addUniqueObjectRequestForKey:(NSString *)key
                              object:(id)object;

- (void)removeObjectRequestForKey:(NSString *)key
                           object:(id)object;

- (void)addRelationRequestForKey:(NSString *)key
                          object:(id)object;

- (void)removeRelationRequestForKey:(NSString *)key
                             object:(id)object;

- (void)incRequestForKey:(NSString *)key
                   value:(double)value;

- (NSMutableDictionary *)initialSetDict;
- (NSMutableDictionary *)initialSetAndAddRelationDict;
- (NSMutableDictionary *)setDict;
- (NSMutableArray *)jsonForCloud;

- (BOOL)containsRequest;
- (void)clear;

@end
